import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import '../method_channel/permission_method_channel.dart';

abstract class PermissionPlatform extends PlatformInterface {
  /// Constructs a PermissionPlatform.
  PermissionPlatform() : super(token: _token);

  static final Object _token = Object();

  static PermissionPlatform _instance = MethodChannelPermission();

  /// The default instance of [PermissionPlatform] to use.
  ///
  /// Defaults to [MethodChannelPermission].
  static PermissionPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [PermissionPlatform] when
  /// they register themselves.
  static set instance(PermissionPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Stream<bool> get adapterState {
    throw UnimplementedError('get adapterState has not been implemented.');
  }
}
